package com.bwda.dsrs.base.centerbase.exception;

/**
 * @author yangjun
 * @date 2019/3/18
 */
public class BaseRuntimeException extends RuntimeException {
    private static final long serialVersionUID = -6209075113162812539L;
    private static final int DEFAULT_ERROR_CODE = 201;
    private int errCode;

    public BaseRuntimeException() {
    }

    public BaseRuntimeException(String msg) {
        super(msg);
        this.errCode = 201;
    }

    public BaseRuntimeException(int errCode, String msg) {
        super(msg);
        this.errCode = errCode;
    }

    public BaseRuntimeException(String msg, Throwable e) {
        super(msg, e);
        this.errCode = 201;
    }

    public BaseRuntimeException(int errCode, String msg, Throwable e) {
        super(msg, e);
        this.errCode = errCode;
    }

    public int getErrCode() {
        return this.errCode;
    }
}